using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DataAccess.Entities;

namespace DataAccess.Mapping
{
	public class OrgBriefTempMap : EntityTypeConfiguration<OrgBriefTemp>
	{
		public OrgBriefTempMap()
		{
			// Primary Key
			this.HasKey(t => t.Id);

			// Properties
			this.Property(t => t.Brief)
				.HasMaxLength(2000);
				
			// Table & Column Mappings
			this.ToTable("OrgBriefTemp");
			this.Property(t => t.Id).HasColumnName("Id");
			this.Property(t => t.Brief).HasColumnName("Brief");

			// Relationships
			this.HasRequired(t => t.OrganizationTemp)
				.WithOptional(t => t.OrgBriefTemp);
				
		}
	}
}

